package org.wxd.category.engine;

import org.wxd.category.api.dto.CategoryRecord;
import org.wxd.category.spi.Category;

/**
 * Created by wangxd on 2015/11/14.
 */
public class CategoryHelper {
    public static CategoryRecord asCategoryRecord(Category category) {
        return CategoryRecord.newBuilder().id(category.id()).name(category.name()).pId(category.parentId())
                .moreInfo(category.moreInfo())
                .build();
    }
}
